﻿using System;
using System.Collections.Generic;
using System.Text;

namespace EasyToHelp.Business
{
    public static class WhereList
    {
        /// <summary>
        /// 文本
        /// </summary>
        /// <returns></returns>
        public static string TextString(string title,string name)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<div class=\"layui-inline\">\r\n");
            sb.Append("     <label class=\"layui-form-label\">"+ title + "</label>\r\n");
            sb.Append("     <div class=\"layui-input-inline\">\r\n");
            sb.Append("         <input type = \"text\" id=\""+name+"\" name=\""+ name + "\" placeholder=\"请输入" + title + "\" autocomplete=\"off\" class=\"layui-input\">\r\n");
            sb.Append("     </div>\r\n");
            sb.Append("</div>\r\n");
            return sb.ToString();
        }
        /// <summary>
        /// 下拉框
        /// </summary>
        /// <returns></returns>
        public static string SelectString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<div class=\"layui-inline\">\r\n");
            sb.Append("     <label class=\"layui-form-label\">文章ID</label>\r\n");
            sb.Append("     <div class=\"layui-input-inline\">\r\n");
            sb.Append("         <select name=\"label\">\r\n");
            sb.Append("         </select>\r\n");
            sb.Append("     </div>\r\n");
            sb.Append("</div>\r\n");
            return sb.ToString();
        }
        /// <summary>
        /// 单选
        /// </summary>
        /// <returns></returns>
        public static string RadioString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<div class=\"layui-inline\">\r\n");
            sb.Append("     <label class=\"layui-form-label\">文章ID</label>\r\n");
            sb.Append("     <div class=\"layui-input-inline\">\r\n");
            sb.Append("         <input type=\"radio\" name=\"sex\" value=\"男\" title=\"男\" checked=\"\">\r\n");
            sb.Append("         <input type=\"radio\" name=\"sex\" value=\"女\" title=\"女\">\r\n");
            sb.Append("     </div>\r\n");
            sb.Append("</div>\r\n");
            return sb.ToString();
        }
        /// <summary>
        /// 是否
        /// </summary>
        /// <returns></returns>
        public static string BoolString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<div class=\"layui-inline\">\r\n");
            sb.Append("     <label class=\"layui-form-label\">文章ID</label>\r\n");
            sb.Append("     <div class=\"layui-input-inline\">\r\n");
            sb.Append("         <input type=\"radio\" name=\"sex\" value=\"1\" title=\"是\" checked=\"\">\r\n");
            sb.Append("         <input type=\"radio\" name=\"sex\" value=\"0\" title=\"否\">\r\n");
            sb.Append("     </div>\r\n");
            sb.Append("</div>\r\n");
            return sb.ToString();
        }
        /// <summary>
        /// 日期区间
        /// </summary>
        /// <returns></returns>
        public static string DateString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<div class=\"layui-inline\">\r\n");
            sb.Append("     <label class=\"layui-form-label\">文章ID</label>\r\n");
            sb.Append("     <div class=\"layui-input-inline\">\r\n");
            sb.Append("         <input type=\"radio\" name=\"sex\" value=\"1\" title=\"是\" checked=\"\">\r\n");
            sb.Append("         <input type=\"radio\" name=\"sex\" value=\"0\" title=\"否\">\r\n");
            sb.Append("     </div>\r\n");
            sb.Append("</div>\r\n");
            return sb.ToString();
        }
    }
}
